home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / 2499.ZIP / EXEC.ZIP / READ.ME < prev   
Text File  |  1988-02-25  |  831b  |  34 lines

  1. Use of EXEC to spawn new processes under windows.
  2. -------------------------------------------------
  3.  
  4. EXEC.ASM should be compiled under MASM and linked with win app.
  5. Following code should be included in C application required to execute other
  6. applications.
  7.  
  8.  
  9. Definitions (in main C app)
  10. ---------------------------
  11.  
  12.  
  13. typedef struct {
  14.     WORD enviroment;
  15.     LPSTR commandline;
  16.     LPSTR FCB1;
  17.     LPSTR FCB2;
  18.     } EXECBLOCK;
  19. extern far pascal Int21Function4B();
  20.  
  21.  
  22. Code within Application to cause loading/execution of other application
  23. -----------------------------------------------------------------------
  24.  
  25.     e.enviroment=0;
  26.     w[0]=2;
  27.     w[1]=SHOW_OPENWINDOW; /* Alter to suit */
  28.     e.commandline=(LPSTR)"\0\r";
  29.     e.FCB1=(LPSTR)w;
  30.     e.FCB2=0L;
  31.     Int21Function4B(0,(LPSTR)"CLOCK.EXE",(LPSTR)&e); /* Insert app name */
  32.  
  33.  
  34.